<?php include ('includes/header_print.php');?>
<?php include ('includes/db_connect.php');?>
<?php
	$sql = "SELECT * FROM complaints WHERE status = 0";
	if (isset($_GET['keyword'])) {
		$sql .= " WHERE complaint_title LIKE '%".$_GET['keyword']."%'";
	}
	$query = mysql_query($sql);
?>

<title>GER | GSC Report</title>
<br>

<div class="row">
        <div class="col-xs-2 col-sm-2 col-md-2 col-lg-2">
            <img src="images/btlogo.png" style="margin-left:20px; margin-top:20px" alt="Image" height="50%" width="50%">
        </div>
        <div class="col-xs-8 col-sm-8 col-md-8 col-lg-8 text-center">
            <h1 style="font-size: 35px;font-family:optimum">IHGER Summary <br>Report <br><a style="font-size:15px; text-decoration:underline overline"><?php echo date("D, M j, Y")?></a></h1>
        </div>
        <colgroup></colgroup>
   <!-- <div class="col-xs-2 col-sm-2 col-md-2 col-lg-2">
            <img src="images/btlogo.png" class="img-responsive" alt="Image">
        </div> -->
                <!-- /.col-lg-12 -->
</div>
<!-- <br> -->
<div style="padding-left: 3px; padding-right: 3px; font-size:10px; font-family:optimum">
	<table class="table table-hover">
		<colgroup>
			<col width="10%"></col>
			<col width="3%"></col>
			<col width="7%"></col>
			<col width="4%"></col>
			<col width="33%"></col>
			<col width="30%"></col>
			<col width="5%"></col>
			<col width="8%"></col>
		</colgroup>
		<thead>
			<tr class="bg-info">
				<th>Guest Name</th>
				<th>Villa</th>
				<th class="text-center">Date Complaint</th>
				<th>Issue</th>
				<th class="text-center">Description</th>
				<th class="text-center">Recovery Action</th>
				<th>F/U by</th>
				<th>Compensation</th>
			</tr>
		</thead>
		<tbody>
			<?php while ($row = mysql_fetch_array($query)) { ?>
				<tr>
					<td><?php echo $row['guest_name'] ?><hr style="border-width:2px border-color:black "> <img src="<?php echo file_exists($row['thumb']) ? $row['thumb'] : 'images/guest.png';?>" class="img-rounded img-responsive" alt="Image" width="100px" height="100px"></td>
					<td><?php echo $row['villa_no'] ?></td>
					<td><?php echo date("M j, Y", strtotime($row['date_complaint'])) ?></td>
					<td><?php echo $row['complaint_title'] ?></td>
					<td style="text-align:justify"><?php echo nl2br($row['description']) ?></td>
					<td style="text-align:justify"><?php echo nl2br($row['recovery']) ?></td>
					<td><?php echo $row['follow_up'] ?></td>
					<td>IDR <?php echo number_format($row['price'], 0, '.', ',') ?></td>
				</tr>
			<?php } ?>
		</tbody>
	</table>
</div>
<?php include ('includes/footer_print.php');?>